<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
      <div id="contentleft">
      <s:if test="(#session.loggedUser == null || #session.loggedUser.amministratore != true) && #session.lastNews.size() != 0">
        <div id="leftheading">
          <h4>Ultime Novità</h4>
        </div>
        <div class="leftboldtxt"><br></div>
        <s:iterator value="#session.lastNews">
            <div class="spot-image">
                <div class="box-image">
                    <a href="<s:url action='dettaglio_articolo' escapeAmp="flase"><s:param name="idArticolo" value="idArticolo"/></s:url>">
                        <img src="<s:property value="foto"/>" width="50" height="50">
                    </a>
                </div>   
            </div>                    
	        <div class="lefttxt"><s:property value="nome"/></div>
	        <div class="lefttxt"><s:property value="prezzo"/> €</div>
	        <div class="leftboldtxt"><br></div>
        </s:iterator>
        </s:if>
        <div id="leftnavheading">
          <h4>Catalogo</h4>
        </div>
        <div id="leftnav">
          <ul>	          
	          <li><a href="<s:url action='catalogo'/>" class="leftnav">Sfoglia per categorie</a></li>
	          <li><a href="<s:url action='inserzionisti'/>" class="leftnav">Sfoglia per inserzionista</a></li>
	      </ul>
	    </div>
        <div id="leftnavheading">
          <h4>Risorse</h4>
        </div>
        <div id="leftnav">
          <ul>
	          <li><a href="<s:url action='home'/>" class="leftnav">Home</a></li>
	          <s:if test="#session.loggedUser == null">
	          <li><a href="<s:url action='showFormRegistrazione'/>" class="leftnav">Registrati</a></li>
	          <li><a href="<s:url action='contacts'/>" class="leftnav">Contatti</a></li>
	          <li><a href="<s:url action='regolamento'/>" class="leftnav">Regolamento</a></li>
	          </s:if>
	          <s:if test="#session.loggedUser != null && #session.loggedUser.amministratore == false">
	          <li><a href="<s:url action='ordini_utente'/>" class="leftnav">Acquisti</a></li>
	          <li><a href="<s:url action='inserzioni_utente'/>" class="leftnav">Inserzioni</a></li>
	          <li><a href="<s:url action='ricapitolazioneDati'/>" class="leftnav">Dati Utente</a></li>
	          </s:if>
	          <s:if test="#session.loggedUser != null && #session.loggedUser.amministratore == true">
	          <li><a href="<s:url action='gestione_categorie'/>" class="leftnav">Gestione Categorie</a></li>
	          <li><a href="<s:url action='gestione_utenti'/>" class="leftnav">Gestione Utenti</a></li>
	          <li><a href="<s:url action='gestione_ordini'/>" class="leftnav">Gestione Ordini</a></li>
	          </s:if>
        </ul>
        </div>
      </div>